import java.io.*;

public class inputStream_test {
    public static void main(String[] args) throws IOException {
        File file = new File("D:\\Test\\新建文本文档.txt");
        FileInputStream fileInputStream = new FileInputStream(file);
        //FileInputStream fileInputStream1 = new FileInputStream("D:\\Test");
        byte [] arr = new byte[1024];
        while (true) {
            int len = fileInputStream.read(arr);
            if(len == -1) {
                break;
            }
            for (int i = 0; i < len; i++) {
                System.out.println(arr[i]);
            }
        }
        fileInputStream.close();
    }
}
